package com.jt.handler;

import com.jt.msg.req.LocationMsg;
import com.jt.msg.req.OtherMsg;
import com.jt.msg.resp.CommonResp;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import org.springframework.stereotype.Component;

/**
 * @author wang xiao
 * date 2023/8/14
 */
@Component
@ChannelHandler.Sharable
public class OtherMsgHandler extends BaseHandler<OtherMsg>{

    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, OtherMsg otherMsg) throws Exception {
        CommonResp resp = CommonResp.success(otherMsg, getSerialNumber(channelHandlerContext.channel()));
        write(channelHandlerContext,resp);
    }
}
